//
//  Overload_IO_operate.cpp
//  learnC++
//
//  Created by apple on 2018/6/4.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#include "Overload_IO_operate.hpp"

std::ostream& operator<< (std::ostream &out, const Point &point)
{
    // Since operator<< is a friend of the Point class, we can access Point's members directly.
    out << "Point(" << point.m_x << ", " << point.m_y << ", " << point.m_z << ")";
    
    return out;
}

Point Point::operator-()const{
    return Point(-m_x,-m_y,-m_z);
}
